package com.example.test.operate.util;


/**
 * <desc>
 * 字符串数据操作帮助类
 * </desc>
 *
 * @craeteDate 2017/09/15
 */
public class StringHandlerUtil {
    public static final String REGEX_MOBILE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";



    /**
     * <desc>
     * 判断字符串是否为null或为空，并返回
     * </desc>
     *
     * @param str
     * @return
     * @author Jiaqi.X
     * @createDate 2017/09/15
     */
    public static String getStringOrNull(String str) {
        if (str != null) {
            if (str.equals("")) {
                return null;
            } else {
                return str;
            }
        }
        return null;
    }

}
